<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<c:set var="path" value="${pageContext.request.contextPath}" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><s:text name="project.name"/></title>
<link rel="icon" href="./favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="resources/css/lib.css" type="text/css" />
<link rel="stylesheet" href="resources/css/home.css" type="text/css" />
<link rel="stylesheet" href="resources/css/style.css" type="text/css" />
<script type="text/javascript" src="sys/index/jquery-1.8.3.min.js"></script> 
<script type="text/javascript" src="sys/index/DB_tabMotionBanner.js"></script>
<script type="text/javascript">
$(function(){
	initForm();
	$("#loginButton").click(function(){
		var userNameVal = $.trim($(".loginUsr").val());
		var passVal = $.trim($(".loginPw").val());
		if(userNameVal == ""){
			$(".loginTip").css("display","block").html("系统提示：请输入用户名!");
		  }else if(passVal == ""){
			$(".loginTip").css("display","block").html("系统提示：请输入密码!");
		  }else if(userNameVal != "" && passVal != ""){
			$.ajax({
				async : false,
				cache:false,
				type: 'post',
				dataType : "text",
				data : {
					"user.userName" : userNameVal
				},
				url: 'sys/isUserExist.action',
				error: function () {
					sysErrorShow('请求失败!');
				},
				success:function(data){
					if(data==0){
						$(".loginTip").css("display","block").html("系统提示：此用户不存在!");
					 }else if(data==1){
						$(".loginTip").css("display","block").html("系统提示：此用户已被禁用!");
					 }else if(data==2){
						$("#loginForm").submit();
					}
				}
			});			  
		 }
	});
	$(".homeRegLink").click(function(){
		$("#loginForm")[0].reset();
	});
	$(document).keyup(function(event){
	 	if(event.keyCode ==13){
	 		$("#loginButton").trigger("click");
	  	}
	});
});
function initForm(){
	setTimeout(function(){
		$(".loginUsr").val("");
		$(".loginPw").val("");
	 },10);	
}
</script>
<style type="text/css">
.header{width:100%;height:53px;margin:30px auto 12px;}
.footer{padding:14px;height:20px;line-height:20px;text-align:center;font-size:12px;font-family:'微软雅黑';}
.loginNameArea,.loginPassArea{width:254px;height:51px;position:relative;}
.loginNameIcon{position:absolute;left:0px;top:0px;background:url("${path}/resources/images/icons/icon_all.png") no-repeat 0 -628px;width:46px;height:50px;}
.loginPassIcon{position:absolute;left:0px;top:0px;background:url("${path}/resources/images/icons/icon_all.png") no-repeat 5px -673px;width:46px;height:50px;}
input:-webkit-autofill{-webkit-box-shadow:0 0 0px 1000px #1c3547 inset;-webkit-text-fill-color:#d2d2d2;}
input::-webkit-input-placeholder,input:-moz-placeholder,input:-ms-input-placeholder{color:#d2d2d2;}
</style> 
</head>
<body>
  <div class="header">
    <img src="${path }/resources/images/logo.png" style="margin-left:110px;" />
  </div>
<div class="loginWidget">
	<div class="loginBox">
		<div class="loginTip" style="display:none;"></div>
		<div class="loginMaske"></div>
		<div class="login">
			<h2>华大邮箱用户登录</h2>
			<form id="loginForm" action="login.action" method="post">
				<div class="loginFilds">
					<div class="loginFildsMask"></div>
					<div class="loginNameArea">					  
					  <input type="text" placeholder="请输入您的邮箱,如：zhangsan" class="homeImage loginField loginUsr" name="user.userName" />
					  <span class="loginNameIcon"></span>
					</div>
					<div class="loginPassArea">
					  <input type="password" placeholder="请输入您的密码" class="homeImage loginField loginPw" name="user.passWord" />
					  <span class="loginPassIcon"></span>
					</div>
				</div>
				<div style="margin: 30px 0 20px 0;" class="clr">
					<input type="button" class="loginPost fll" value="立即登录" id="loginButton" /> <a class="homeRegLink flr" href="javascript:void(0);">重置</a>
				</div>
			</form>
		</div>
	</div>
</div>  
<!--跑马banner-->
<div class="DB_tab25">
	<ul class="DB_bgSet">
		<li style="background:#e0e0e0 url('${path }/resources/images/1.jpg') no-repeat center center;"></li>
		<li style="background:#88ddf9 url('${path }/resources/images/2.jpg') no-repeat center center;"></li>
		<li style="background:#9f9f9f url('${path }/resources/images/3.jpg') no-repeat center center;"></li>
	</ul>
	<ul class="DB_imgSet">
		<li>
			<img class="DB_1_1" src="${path }/resources/images/text1.png" />	
		</li>
		<li>
			<img class="DB_2_1" src="${path }/resources/images/text2.png" />
			<img class="DB_2_2" src="${path }/resources/images/circle.png" />
			<img class="DB_2_3" src="${path }/resources/images/map.png" />		
		</li>
		<li>
			<img class="DB_3_1" src="${path }/resources/images/text3.png" />
			<img class="DB_3_2" src="${path }/resources/images/lock.png" />	
		</li>
	</ul>
	<div class="DB_menuWrap">
		<ul class="DB_menuSet">
			<li><img src="${path }/resources/images/btn_off.png" alt=""/></li>
			<li><img src="${path }/resources/images/btn_off.png" alt=""/></li>
			<li><img src="${path }/resources/images/btn_off.png" alt=""/></li>
		</ul>
		<div class="DB_next"><img src="${path }/resources/images/nextArrow.png" alt="NEXT"/></div>
		<div class="DB_prev"><img src="${path }/resources/images/prevArrow.png" alt="PREV"/></div>
	</div>
</div>
<script type="text/javascript">
		$('.DB_tab25').DB_tabMotionBanner({
			key:'b28551',
			autoRollingTime:4000,                            
			bgSpeed:500,
			motion:
			{
				DB_1_1:{top:-24,opacity:0,speed:1000,delay:500},
				DB_2_1:{top:30,opacity:0,speed:1000,delay:1000},
				DB_2_2:{left:40,opacity:0,speed:1000,delay:1000},
				DB_2_3:{top:-40,opacity:0,speed:1000,delay:1000},
				DB_3_1:{left:-40,opacity:0,speed:1000,delay:500},
				DB_3_2:{top:40,opacity:0,speed:1000,delay:500},
				end:null
			}
			
		})
</script>
<!--跑马banner-->
  <div class="footer">
    Copyright © <script>document.write((new Date().getFullYear()=='2015'?'2015':('2015-'+new Date().getFullYear())));</script> BGI
  </div>
</body>
</html>